package Day06;

import java.util.Scanner;

public class Test7 {
    public static void main(String[] args) {
        Scanner in =new Scanner(System.in);
        System.out.println("请输入要判断的数据：");
        int n = in.nextInt();
        int b,s,g;
         b = n / 100;
         s = n % 100 / 10;
         g = n % 10;
        if (b*b*b+s*s*s+g*g*g==n){
            System.out.println("这个三位数为水仙花数！");
        }else
        {
            System.out.println("这个三位数不是水仙花数！");
        }
    }
}
